# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ntpdos
pkgver=4.3fe389b
pkgrel=1
epoch=1
pkgdesc='PoC for distributed NTP reflection DoS (CVE-2013-5211)'
groups=('blackarch' 'blackarch-dos')
arch=('x86_64' 'aarch64')
url='https://github.com/sepehrdaddev/ntpdos'
license=('GPL3')
depends=()
makedepends=('git' 'gcc' 'make')
source=("git+https://github.com/sepehrdaddev/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  DESTDIR="$pkgdir" make install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

